<%@ page language="java" contentType="text/html; charset=utf-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp"%>
<%@ include file="/commons/validation.jsp"%>
<%@ include file="/commons/dateTime.jsp"%>

<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript" src="${ctx }/scripts/public3.js"></script>
<title>装修验收-编辑</title>
<script>
function setRenovateViolitionId(id){
	parent.setRenovateViolitionId(id);
}
function editItem(){

	var isPass=$('inspection').fireEvent("onSubmit");
	if(isPass){
		closeORopenButton();
		var param = Form.serialize('inspection');
		var url = '${ctx }/renovation_inspectionRequisitionAction.do?method=editInspectionRequisition';
		new Ajax.Request(url,{method: 'post',parameters :param ,onSuccess : function(response){
			closeORopenButton();
            ajaxSubmitException(response.responseText);
      		if("true" == response.responseText){
	       		var obj=findFrame('inspectionRequisitionList');
	       		obj.parent.refresh();
		        windowClose();
	        }
		}});
	}
}

function closeORopenButton(){
	$('btn1_22').disabled= !$('btn1_22').disabled;
}
</script>
</head>
<body>
<form id="inspection" name="inspection" method="post" action=""
	class="required-validate">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="2" class="window_head_outBg">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td><img src="${ctx}/images/ico_Advance.gif" width="16"
					height="16" align="absmiddle" /> <span class="window_head_intext">竣工验收申请</span></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="aux_header_line_1"></td>
	</tr>
	<tr>
		<td colspan="2" class="aux_header_line_2"></td>
	</tr>
	<tr>
		<td colspan="2" class="content">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="aux_outtable_color">
				<table width="100%" border="0" cellpadding="0" cellspacing="1"
					class="aux_intable_color">
					<tr>
						<td class="aux_intable_td1">房 号：</td>
						<td class="aux_intable_td2"><input name="renovateLicenceId"
							id="renovateLicenceId" type="hidden"
							value="${inspectionRequisitionVO.renovateLicenceId }" /><input
							name="inpectionState" id="inpectionState" type="hidden"
							value="${inspectionRequisitionVO.inpectionState }" /> <input
							name="keyword" id="keyword" type="hidden"
							value="${inspectionRequisitionVO.keyword }" /> <input
							name="houseNumber" id="houseNumber" type="hidden"
							value="${inspectionRequisitionVO.houseNumber }" />${inspectionRequisitionVO.houseNumber
						}</td>
						<td class="aux_intable_td1">业主姓名：</td>
						<td class="aux_intable_td2">${inspectionRequisitionVO.clientNames
						}</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">装修许可证号：</td>
						<td class="aux_intable_td2"><input name="renovateLicenceId"
							id="renovateLicenceId" type="hidden"
							value="${inspectionRequisitionVO.renovateLicenceId }" />${inspectionRequisitionVO.renovateLicence
						}</td>
						<td class="aux_intable_td1">装修承建商：</td>
						<td class="aux_intable_td2">${inspectionRequisitionVO.companyName
						}</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">装修联系人：</td>
						<!--<td class="aux_intable_require"><input name="textfield232222222" type="text" class="inputtext" value="13572689784" size="16" /></td>-->
						<td class="aux_intable_td2">${inspectionRequisitionVO.linkMan
						}</td>
						<td class="aux_intable_td1">联系电话：</td>
						<td class="aux_intable_require"><input name="linkManPhone"
							id="linkManPhone" type="text" class="inputtext required"
							value="${inspectionRequisitionVO.linkManPhone }" size="16"
							maxlength="30" /></td>
					</tr>
					<tr>
						<td class="aux_intable_td1">现场负责人：</td>
						<td class="aux_intable_td2">${inspectionRequisitionVO.burdenMan
						}</td>
						<td class="aux_intable_td1">联系电话：</td>
						<td class="aux_intable_td2"><input name="burdenManPhone"
							id="burdenManPhone" type="text" class="inputtext"
							value="${inspectionRequisitionVO.burdenManPhone }" size="16"
							maxlength="30" /></td>
					</tr>
					<tr>
						<td class="aux_intable_td1">装修竣工日期：</td>
						<td class="aux_intable_require">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><input name="finishDate" id="finishDate" type="text"
									class="inputtext required validate-date-yyyy-mm-dd"
									value="${inspectionRequisitionVO.finishDateStr }" size="16" /></td>
								<td width="4">&nbsp;</td>
								<td><img id="finishDateImg"
									src="${ctx}/images/ico_clock_month.gif" alt="请点选查找日期"
									border="0" /></td>
							</tr>
						</table>
						</td>
						<td class="aux_intable_td1">申请验收时间：</td>
						<td class="aux_intable_require">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><input name="inspecteDateStr" id="inspecteDateStr"
									type="text"
									class="inputtext required validate-dateTime-yyyy-mm-dd-HH时"
									size="16" value="${inspectionRequisitionVO.inspecteDateStr }" /></td>
								<td width="4">&nbsp;</td>
								<td><img id="inspecteDateImg"
									src="${ctx}/images/ico_clock.gif" alt="请点选查找日期" border="0" /></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>

		<td class="window_footer">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="buttonOffLeft" id="btn1_21"></td>
						<td class="buttonOffMiddle" id="btn1_22"
							onClick="javascript:editItem();" onMouseOver="btn_change_over(2)"
							onMouseOut="btn_change_out(2)" onblur="btn_change(2)"><img
							src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14"
							border="0" align="absbottom" /> 保 存</td>
						<td class="buttonOffRight" id="btn1_23"></td>
					</tr>
				</table>
				</td>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="buttonOffLeft" id="btn1_31"></td>
						<td class="buttonOffMiddle" id="btn1_32"
							onClick="javascript:windowClose();"
							onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"
							onblur="btn_change(3)"><img
							src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14"
							border="0" align="absbottom" /> 关 闭</td>
						<td class="buttonOffRight" id="btn1_33"></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		<p>&nbsp;</p>
		</td>
	</tr>
</table>
</form>
<script type="text/javascript">
             Calendar.setup(
              {
	              inputField : "finishDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "finishDateImg", // ID of the button
	             // align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );
             Calendar.setup(
                     {
       	              inputField : "inspecteDateStr", // ID of the input field
       	              ifFormat : "%Y-%m-%d %H时", // the date format
       	              button : "inspecteDateImg", // ID of the button
       	             // align          :    "Tl",           // alignment (defaults to "Bl")
       			      singleClick    :    true
                     }
                     );

</script>
</body>
</html>